import 'babel-polyfill';
// import 'indexeddbshim';
import "./libs/polyfill/extension";
import "./libs/polyfill/filters";
import './libs/polyfill/plus';
import Formatter from './libs/framework/formatter.js';
// 集成文件
import '@/libs/integrate/install.js'

// Import Vue
import Vue from 'vue'
// Import Framework7
import Framework7 from './libs/framework7/framework7.bundle.js'
// Import Framework7-Vue Plugin
import Framework7Vue from './libs/framework7/framework7-vue.bundle.js'
// Import Framework7 Styles
import 'framework7/css/framework7.bundle.css'


import './assets/css/app.css';
import './assets/css/fontsize.css';
// import '@theme/main.less';
import './assets/css/business.less'
import './assets/css/project.less'
import './assets/css/im.css';
import './assets/css/them.css'
import './assets/css/qm-ui.css'
import './assets/fonts/iconfont.css'
// import 'vant/lib/dialog/style/less';
// Import App Component
import app from './app.vue'

import components from './libs/components/install'
import Config from "./libs/config.js";


//视频播放相关插件
// import VueVideoPlayer from 'vue-video-player'
//import 'videojs-flash'
// import 'videojs-contrib-hls'
// import 'video.js/dist/video-js.css'
// import 'vue-video-player/src/custom-theme.css'
// Vue.use(VueVideoPlayer);
// import './assets/css/videojs_custom.css';

// // 手势相关
// import VueTouch from 'vue-touch'
// // 点击两次
// VueTouch.registerCustomEvent('doubletap', {
//     type: 'tap',
//     taps: 2
// });
// Vue.use(VueTouch, { name: 'v-touch' })

// 百度地图
import BaiduMap from 'vue-baidu-map';
Vue.use(BaiduMap, {
  ak: Config.setting.baiduMapAk
});

// android点击手机物理返回键退出app bug解决
document.addEventListener("plusready", function() {
	plus.key.addEventListener('backbutton', function() {
		window.history.go(-1);
	}, false);
}) 

// import VueTianditu from "vue-tianditu";
// Vue.use(VueTianditu, {
//   v: "4.0", //目前只支持4.0版本
//   tk: "650406f71faf6f78697283341448092a"
// });
/* eslint-disable */

// Init Framework7-Vue Plugin
Framework7.use(Framework7Vue)

components.forEach(r => {
  Vue.use(r);
});

// import { Dialog, PullRefresh } from 'vant';
// Vue.use(Dialog);
// Vue.use(PullRefresh);

// 全量引入vant
import Vant from 'vant';
import 'vant/lib/index.css';
Vue.use(Vant);

// vuex
import store from './libs/store/install';

window.formatter = Formatter;

window.vue = new Vue({
  el: "#app",
  render: c => c(app),
  store,
  components: {
    app
  }
});

import '@/libs/polyfill/directive.js'

// window.shimIndexedDB.__useShim();
export default (window.vue);
